export const questionSelectConfig = {
  "type": "crud",
  "syncLocation": false,
  "api": {
    "method": "get",
    "url": "http://localhost:8080/question/questionlist",
    "messages": {
    },
    "requestAdaptor": "",
    "adaptor":
      "const map = {\r\n  'blank': '填空题',\r\n  'select': '选择题',\r\n  'picture': '主观题'\r\n}\r\nconst rows = payload.data.rows.map(v => ({ ...v, type: map[v.type] }));\r\nreturn { rows, total: payload.data.total }",
    "dataType": "json",
    "data": {
      "&": "$$",
      "pageNum": 1,
      "pageSize": 10
    }
  },
  "filterColumnCount": 3,
  "filter": {
    "title": "查询",
    "body": [
      {
        "type": "group",
        "body": [
          {
            "type": "input-text",
            "name": "id",
            "label": "题目ID",
            "clearable": true,
            "size": "sm",
            "id": "u:e059f3565437",
          },
          {
            "type": "select",
            "label": "题目类型",
            "name": "type",
            "options": [
              {
                "label": "所有类型",
                "value": "",
              },
              {
                "label": "填空题",
                "value": "blank",
              },
              {
                "label": "主观题",
                "value": "picture",
              },
              {
                "label": "选择题",
                "value": "select",
              },
            ],
            "id": "u:b3fe7a62c54c",
            "multiple": false,
            "value": "",
            "placeholder": "",
          },
        ],
        "id": "u:acebf078ad59",
      },
    ],
    "actions": [
      {
        "type": "submit",
        "level": "primary",
        "label": "查询",
        "id": "u:dcf97f13741b",
      },
    ],
    "id": "u:b01098e45095",
  },
  "filterTogglable": true,
  "bulkActions": [
    {
      "type": "button",
      "label": "确认选择",
      "id": "u:b7cd428fc142",
      "actionType": "dialog",
      "dialog": {
        "title": "输入试卷名称",
        "size": "md",
        "body": {
          "type": "form",
          "rules": [
            {
              "rule": "data.paperName",
              "message": "试卷名不能为空"
            }
          ],
          "api": {
            "method": "post",
            "url": "http://localhost:8080/manual_questions",
            "requestAdaptor": "",
            "adaptor": "",
            "messages": {
            },
            "dataType": "json"
          },
          "body": [
            {
              "type": "hidden",
              "name": "ids"
            },
            {
              "name": "paperName",
              "label": "试卷名称",
              "type": "input-text",
              "id": "u:fef660a8052e"
            }
          ],
          "id": "u:4eacf263a1bb"
        }
      }
    }
  ],
  "itemActions": [
  ],
  "id": "u:72ee6104cd95",
  "headerToolbar": [
    "bulkActions","filter-toggler"
  ],
  "autoFillHeight": true,
  "title": "选择问题",
  "keepItemSelectionOnPageChange": true,
  "mode": "table",
  "columns": [
    {
      "type": "text",
      "id": "u:3f358ff83497",
      "name": "id",
      "label": "ID",
      "placeholder": "-"
    },
    {
      "type": "text",
      "label": "类型",
      "name": "type",
      "id": "u:24af481f8118"
    },
    {
      "type": "text",
      "label": "内容",
      "name": "content",
      "id": "u:c3fccf6e8d6e",
      popOver: {
        type: "panel",
        title: "题目详情",
        body: [
          {
            type: "tpl",
            tpl: "${content}",
            wrapperComponent: "",
            inline: false,
            id: "u:8241c6dd0e5c",
            hiddenOn: "${STARTSWITH(content, 'http')}",
          },
        ],
        id: "u:f3242260fd48",
        actions: [
          {
            type: "flex",
            id: "u:b76e50629a7e",
            className: "p-1",
            items: [
              {
                type: "container",
                body: [
                  {
                    type: "image",
                    id: "u:a588c87c8810",
                    width: 100,
                    height: 242,
                    enlargeAble: true,
                    imageMode: "original",
                    src: "",
                    hiddenOn: "${!STARTSWITH(content, 'http')}",
                    thumbRatio: "4:3",
                    className: "",
                    thumbClassName: "",
                    imageClassName: "image-amis",
                  },
                ],
                size: "xs",
                style: {
                  position: "static",
                  display: "block",
                  flex: "1 1 auto",
                  flexGrow: 1,
                  flexBasis: "auto",
                },
                wrapperBody: false,
                isFixedHeight: false,
                isFixedWidth: false,
                id: "u:1bbc9b245ce4",
              },
            ],
            style: {
              position: "relative",
              inset: "auto",
              flexWrap: "nowrap",
              width: "100%",
              overflowX: "auto",
              margin: "0",
              height: "100%",
              overflowY: "auto",
            },
            isFixedHeight: true,
            isFixedWidth: true,
          },
        ],
        affixFooter: false,
        hidden: false,
        mode: "dialog",
      },
    }
  ],
  "messages": {
  },
  "footerToolbar": [
    {
      "type": "pagination",
      "tpl": "内容",
      "wrapperComponent": ""
    },
    {
      "type": "statistics",
      "tpl": "内容",
      "wrapperComponent": "",
      "id": "u:191814e46e7e"
    }
  ],
  "perPageAvailable": [
    10
  ],
  "columnsTogglable": true,
  "className": ".question-select",
  "perPage": 10
}